<%= simple_form_for [:admin, @user], :defaults => { :input_html => { :class => "form-control" } }, remote: true, html: {class: 'form-horizontal' } do |f| %>
	<fieldset>
		<legend><%= title %></legend>
		<%= f.input :email, label: 'Email' %>
		<% if ["new", "edit_password"].include?(params[:action]) %>
		  <%= f.input :password, label: 'Password' %>
		  <%= f.input :password_confirmation, label: 'Password Confirmation' %>
  	<% end %>
  	<% if ["new", "edit"].include?(params[:action]) %>
	  	<%= f.association :groups, collection: @groups, label: '子组', checked: @checked_groups, :input_html => { class: "" }  %>
	  <% end %>
	  <%= f.button :wrapped, value: '提 交' %>
	</fieldset>
<% end %>
<%= javascript_tag do %>
  $('#admin_group_ids').select2({width: "100%"});
<% end %>
<%= javascript_include_tag "prevent_label.js" %>
